package com.example.javaweb1.controller;

import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;

import java.io.IOException;
import java.util.Date;

public class loginFilter implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest httpServletRequest=(HttpServletRequest) request;
        String requestURI=httpServletRequest.getRequestURI();
        String method=httpServletRequest.getMethod();
       Date requestTime=new Date();
        System.out.println("Request URI: " + requestURI + ", Method: " + method + ", Time: " + requestTime);
   chain.doFilter(request,response);
    }
}
